
let form = layui.form
// let layer = layui.layer

form.verify({
    same: function (value) {
      var uname = $('.layui-form input[name=password]').val()
      if (value !== uname) {
        return '两次输入的密码不一样'
      }
    }
  })
// 获取令牌
let token = localStorage.getItem('token')

$('form').on('submit', function (e) {
     
   e.preventDefault();
        
   Headers:{'token'} 
      

   let  data =$(this).serialize()

//    alert(data)
   $.ajax({
       type: "post",
       url: '/admin/users',
       data: data,
       
       success: function (res) {
           layer.msg(res.message)

       }


   })
})







